<!DOCTYPE html>
<html>
    <head>
        <title>DDI eXist</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="description" content="Collection of projects and demos for using DDI in eXist"/>
        <meta name="keywords" content="DDI, eXist, XSLT, OAI-PMH, epub, xQuery"/>
        <meta name="robots" content="index,follow"/>
        
        <link rel="favicon" href="img/question_hover.png" type="image/png" />
        <link type="text/css" rel="stylesheet" href="lib/css/layout-default-latest.css"/>
        <link type="text/css" rel="stylesheet" href="lib/css/smoothness/jquery-ui-1.8.13.custom.css"/>
        <link type="text/css" rel="stylesheet" href="lib/css/jquery.multiselect.css"/>
        <link type="text/css" rel="stylesheet" href="lib/css/jquery.multiselect.filter.css"/>
        
        <link type="text/css" rel="stylesheet" href="catalogue.css" />
        
        <script type="text/javascript" src="lib/js/jquery-1.7.2.js"></script>
        <script type="text/javascript" src="lib/js/jquery-ui-latest.js"></script>

        <script type="text/javascript" src="lib/js/jquery.pagination.js"></script>
        <script type="text/javascript" src="lib/js/jquery.multiselect.min.js"></script>
        <script type="text/javascript" src="lib/js/jquery.multiselect.filter.js"></script>
        <script type="text/javascript" src="lib/js/jquery.localize.js"></script>
        <script type="text/javascript" src="lib/js/jquery.ba-bbq.js"></script>
        <script type="text/javascript" src="lib/js/jquery.format.js"></script>
        <script type="text/javascript" src="lib/js/jquery.highlight.js"></script>
        
        <script type="text/javascript" src="scripts/extensions.js"></script>
        
        <script type="text/javascript" src="config.js"></script>

        <script type="text/javascript" src="scripts/question.js"></script>
        <script type="text/javascript" src="scripts/study.js"></script>
        <script type="text/javascript" src="scripts/variable.js"></script>
        <script type="text/javascript" src="catalogue.js"></script>
    </head>
    <body>
        <div class="ui-layout-center" id="center-div">
            <div id="catalogue">
                <div id="top_bar">
                    <div id="languages">
                        <a href="javascript:" data-localize="swedish" data-mode="sv">Svenska</a> | 
                        <a href="javascript:" data-localize="english" data-mode="en">Engelska</a>
                    </div>
                </div>                

                <form id="search-form" method="get">
                    <input type="search" name="s" id="search" data-localize="search_placeholder" placeholder="Search in studies, questions or variables"/>
                    <!--
                    <select name="lang" id="select-language">
                        <option value="all" data-localize="all" selected="selected">All</option>
                        <option value="en" data-localize="english">English</option>
                        <option value="sv" data-localize="swedish">Swedish</option>
                    </select>
                    -->
                    <input type="submit" data-localize="search" value="Search" class="ui-button ui-widget ui-state-default ui-corner-all"/>
                    <div class="advanced">
                        <p class="heading" data-localize="advanced_search">Advanced search</p>
                        <div class="content">
                            <label for="series" data-localize="series">Series</label>:<br/>
                            <select id="series" name="series" multiple="multiple"></select><br/>
                            <label for="availability" data-localize="availability">Availability</label>:<br/>
                            <select id="availability" name="availability">
                                <option data-localize="all">alla</option>
                                <option>1a - Freely available without registration</option>
                                <option>1b - Freely available via ordering or Open data</option>
                                <option>1c - Freely available via ordering</option>
                                <option> 2b - Always requires permission from the principal investigator</option>
                                <option>3a - The study is not available through SND. Can be downloaded from an external website</option>
                                <option>3b - The study is not available through SND. Please contact the principal investigator for more information</option>
                            </select><br/>
                            <label for="title" accesskey="t" data-localize="title">Title</label>:<br/><input type="text" name="title" /><br/>
                            <label for="creator" accesskey="c" data-localize="creator">Creator</label>:<br/><input type="text" name="creator"/><br/>
                            <label for="publisher" accesskey="p" data-localize="publisher">Publisher</label>:<br/><input type="text" name="publisher"/><br/>
                            <span data-localize="from">from</span> 
                            <input type="number" name="from"/> 
                            <span data-localize="to">to</span> 
                            <input type="number" name="to"/><br/>
                        </div>
                    </div>
                </form>
                <div id="result-wrapper">
                    <div id="facets" class="ui-widget-content ui-corner-all">
                        <div class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix">
                            <span class="ui-dialog-title" id="ui-dialog-title-dialog">Filter</span>
                        </div>
                        <div id="facets-content">
                        </div>
                    </div>
                    <div id="result">
                        <ul>
                            <li class="study-tab"><a href="#studies"><span data-localize="studies">Studies</span> <span id="study-hits-count" class="count"></span></a></li>
                            <li class="question-tab"><a href="#questions"><span data-localize="questions">Questions</span> <span id="question-hits-count" class="count"></span></a></li>
                            <li class="variable-tab"><a href="#variables"><span data-localize="variables">Variables</span> <span id="variable-hits-count" class="count"></span></a></li>
                        </ul>
                        <div id="studies">
                            <div class="pagination" id="study-pagination"></div>
                            <div id="study-result"></div>
                        </div>                    
                        <div id="questions">
                            <div class="pagination" id="question-pagination"></div>
                            <div id="question-result"></div>
                        </div>
                        <div id="variables">
                            <div class="pagination" id="variable-pagination"></div>
                            <div id="variable-result"></div>
                        </div>                
                    </div>
                </div>
            </div>
        </div>
        <div style="clear:both">
            <a href="#">Implementation &amp; bugs</a>
            <pre>
Next to be implemented:
  *alfa order on studies, questions and variables
  *render response-domain
  *filter for time
  *show questionnaire direct link
  *Search filters
    *d:ModeOfCollection
    *r:Publisher
  *Rebuild series filter
    -tree view with sub-series
  *keep track of page in url
  *better display of study-results

Recently done:
  *blank search gives all studies,questions and variables
  *fix for study-links
  *variable search
  *Language switch for search results
  *autocomplete
    *title
    *creator

Known bugs:
  *search hangs on some results
  *external links not working
  *shows
  *huge load time in some cases for 
   {ddi-exist-utils:renderResponseDomain($question) } 
   in question render

sugestions and bug-submissions: olof.olsson at snd.gu.se
            </pre>
        </div>
        <div><a href="http://exist-db.org"><img src="http://pelle.ssd.gu.se:8080/exist/functions/util/resources/powered.gif" /></a></div>
    </body>
</html>